package com.woniuxy.homepage.core.mapper;

import com.woniuxy.homepage.core.model.CarStyle;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gmx
 * @since 2021-06-29
 */
public interface CarStyleMapper extends BaseMapper<CarStyle> {

    @Select("select distinct displacement from car_style where brand_id = #{brandId} and type_id = #{typeId}")
    List<String> seletDis(Integer brandId, Integer typeId);

    @Select("select distinct year from car_style where brand_id = #{brandId} and type_id = #{typeId} and displacement = #{displacement}")
    List<String> selectYear(Integer brandId, Integer typeId, String displacement);

    @Select("select distinct style from car_style where brand_id = #{brandId} and type_id = #{typeId} and displacement = #{displacement} and year = #{year}")
    List<String> selectStyle(Integer brandId, Integer typeId, String displacement, String year);
}
